﻿using System;

namespace HamcoWcs.Models.Common
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)]
    public class VuageQueryAttribute : Attribute
    {
        public VuageQueryAttribute(EnumVuageQueryType queryType = EnumVuageQueryType.StringContains, string orderName = null, object defaultValue = null, object value = null, string targetPropertyName = null)
        {
            QueryType = queryType;
            Value = value;
            DefauleValue = defaultValue;
            TargetPropertyName = targetPropertyName;
            OrderName = orderName;
        }
        public string TargetPropertyName { get; set; }
        public string OrderName { get; set; }
        public object Value { get; set; }
        public object DefauleValue { get; set; }
        public EnumVuageQueryType QueryType { get; set; }

    }

    public enum EnumVuageQueryType
    {
        StringContains,
        String,
        Long,
        Int,
        Double,
        Float,
        StartTime,
        EndTime,
        Page,
        Size,
        Order,
        OrderDesc,
        Ignore
    }
}
